
#include <Windows.h>

struct CameraResult
{
	double operation_interval;
	CameraResult() : operation_interval(0) {}
};

typedef void * (__stdcall * INIT)(int camera_index);
typedef int (__stdcall * DEINIT)(void * subject);
typedef CameraResult (__stdcall * RUN)(void * subject);


void main()
{
	HMODULE dll = LoadLibraryA("camera_calibration.dll ");
	INIT init = (INIT) GetProcAddress(dll, "initialize");
	DEINIT deinit = (DEINIT) GetProcAddress(dll, "UNinitialize");
	RUN run = (RUN) GetProcAddress(dll, "run_camera");

	void * instance = init(0);
	for (int i=0; i<100; i++)
	{
		CameraResult res = run(instance);
	}
	int i = deinit(instance);

}


















